#!/bin/bash
# Copyrignt (c) maozhihua.com. All Rights Reserved.
# Author: Mao Zhihua<maozhihua@skyworth.com>
# Created Time: 2016-09-10 16:02:07
# Last Modified: 2016-10-20 11:39:45
# File Name: update_module_order.sh
# Description: 

source ./gl.sh

#body='{"region_code":"all","clickable":1,"title":"晒单拿好礼","banner_type":"pic","pic_url":"https://fscdn.doubimeizhi.com/scloud/e/b/c/d725bad2001dd6c76a189dd6e0f69","web_url":"https://www.zhijianyaokong.com","starttick":1,"endtick":1499999999,"routers":"zhjt://app.zjdj.com/webin?http://www.zhijiandaojia.com"}'


#curl -v -k "https://${host}/homepage/web/banner/add?appkey=${appkey}" -d "${body}"


body1='{"region_code":"all","clickable":1,"title":"","pic_url":"http://www.zhijianyaokong.com/uploads/adverop/redpacket/banner-540-1080-zj-redpacket.png","starttick":1,"endtick":1499999999,"routers":"zhjt://app.zjdj.com/webin?url=http%3a%2f%2fwww.zhijianyaokong.com%2factivity%2fjiadianquan%2farticle_detail.html%3fid%3d192"}'
body2='{"region_code":"all","clickable":1,"title":"","pic_url":"http://www.zhijianyaokong.com/uploads/adverop/redpacket/banner-red-packet-strategy-540-1080.png","starttick":1,"endtick":1499999999,"routers":"zhjt://app.zjdj.com/webin?url=http%3a%2f%2fwww.zhijianyaokong.com%2factivity%2fjiadianquan%2farticle_detail.html%3fid%3d193"}'
body3='{"region_code":"all","clickable":1,"title":"","pic_url":"http://www.zhijianyaokong.com/uploads/adverop/skyworth-mobile-shop-540-1080-banner.png","starttick":1,"endtick":1499999999,"routers":"zhjt://app.zjdj.com/mall_mobile"}'
body4='{"region_code":"all","clickable":1,"title":"","pic_url":"http://www.zhijianyaokong.com/activity/saidan/images/share-top.png","starttick":1,"endtick":1499999999,"routers":"zhjt://app.zjdj.com/webin?url=http%3a%2f%2fwww.zhijianyaokong.com%2factivity%2fsaidan%2findex1.html"}'
curl -v -k -H "Host:adop.app.doubimeizhi.com" "https://10.169.94.211:443/homepage/web/banner/add?appkey=${appkey}" -d "${body1}"
curl -v -k -H "Host:adop.app.doubimeizhi.com" "https://10.169.94.211:443/homepage/web/banner/add?appkey=${appkey}" -d "${body2}"
curl -v -k -H "Host:adop.app.doubimeizhi.com" "https://10.169.94.211:443/homepage/web/banner/add?appkey=${appkey}" -d "${body3}"
curl -v -k -H "Host:adop.app.doubimeizhi.com" "https://10.169.94.211:443/homepage/web/banner/add?appkey=${appkey}" -d "${body4}"
